package com.xx.ems.system;

import javax.annotation.Resource;

import org.hibernate.Transaction;

import com.xx.ems.dao.EquipmentCRUDDao;
import com.xx.ems.dao.EquipmentReceiveDao;
import com.xx.ems.dao.PermissionsDao;
import com.xx.ems.dao.UsersCRUDDao;

/**
 * @author xxx
 * @date 2014-2-26
 * @version 1.0
 * 描述: Service的基础类,实现公共的属性、方法
 */
public class BaseService extends BaseDS {
	@Resource
	private EquipmentCRUDDao equipmentCRUDDao;
	@Resource
	private PermissionsDao permissionsDao;
	@Resource
	private UsersCRUDDao usersCRUDDao;
	@Resource
	private EquipmentReceiveDao equipmentReceiveDao;
	
	public EquipmentCRUDDao getEquipmentCRUDDao() {
		return equipmentCRUDDao;
	}
	public void setEquipmentCRUDDao(EquipmentCRUDDao equipmentCRUDDao) {
		this.equipmentCRUDDao = equipmentCRUDDao;
	}
	public PermissionsDao getPermissionsDao() {
		return permissionsDao;
	}
	public void setPermissionsDao(PermissionsDao permissionsDao) {
		this.permissionsDao = permissionsDao;
	}
	public UsersCRUDDao getUsersCRUDDao() {
		return usersCRUDDao;
	}
	public void setUsersCRUDDao(UsersCRUDDao usersCRUDDao) {
		this.usersCRUDDao = usersCRUDDao;
	}
	public EquipmentReceiveDao getEquipmentReceiveDao() {
		return equipmentReceiveDao;
	}
	public void setEquipmentReceiveDao(EquipmentReceiveDao equipmentReceiveDao) {
		this.equipmentReceiveDao = equipmentReceiveDao;
	}
	/**
	 * 描述: 获取事务 
	 * @return
	 * @date 2014-2-26
	 */
	public Transaction getTransaction() {
		return getCurrentSession().beginTransaction();
	}
}